package org.sample.ams.domain.entity;

import javax.persistence.Column;
import javax.persistence.Entity;

import org.springframework.core.annotation.Order;
import org.wisdom.data.jpa.annotation.SerialNumber;
import org.wisdom.data.jpa.entity.BaseEntity;

import lombok.*;
import lombok.extern.slf4j.Slf4j;

/**
 * 工单
 *
 * @author 张智研
 * @date 2022/05/28 10:18
 **/
@EqualsAndHashCode(callSuper = true)
@Entity
@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString(callSuper = true)
@Slf4j
public class AmsWorkOrder extends BaseEntity {

    @Column(nullable = false)
    @SerialNumber(key = "{t}{workOrderType}{d}", value = "{workOrderType}{d}{n}")
    @Order(1)
    private String workOrderCode;

    @Column(nullable = false)
    @Order(2)
    private String workOrderType;
}
